package com.gxc.datacore.privilege.service;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.gxc.datacore.privilege.domain.RoleColumn;
import com.gxc.dbcore.dao.SqlDao;
import com.gxc.dbcore.service.BeanService;
import com.gxc.dbcore.util.PageInfo;
import com.gxc.dbcore.util.PageList;

@Service
public class RoleColumnService {

	@Autowired
	private SqlDao sqlDao;
	@Autowired
	private BeanService beanService;

	public RoleColumn retrieve(String id) {
		return beanService.get(sqlDao, RoleColumn.class, id);
	}

	public int create(RoleColumn roleColumn) {
		return beanService.create(sqlDao, roleColumn);
	}

	public int update(RoleColumn roleColumn) {
		return beanService.update(sqlDao, roleColumn);
	}

	public int delete(String id) {
		return beanService.delete(sqlDao, RoleColumn.class, id);
	}

	public int delete(String[] id_array) {
		return beanService.delete(sqlDao, RoleColumn.class, id_array);
	}

	@SuppressWarnings("rawtypes")
	public List list(Map params) {
		return beanService.list(sqlDao, RoleColumn.class, null, null);
	}

	@SuppressWarnings("rawtypes")
	public PageList listPage(Map params, PageInfo pageInfo) {
		return beanService.listPage(sqlDao, RoleColumn.class, null, null,
				pageInfo);
	}

}
